<%-- 
    Document   : ViewTag
    Created on : Dec 7, 2010, 1:23:12 AM
    Author     : Dhruv
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Tagged Images</title>
        <!--below css stylesheet defines page design-->
        <link rel="stylesheet" href="css/styles.css" type="text/css" media="screen" />
    </head>
    <body>
        <div id="wrapper">
            <!--SuperSeeker logo-->
            <img alt="." src="images/mylogo.jpg"/>

            <!--below is code for the menubar-->
            <ul id="blue">
                <!--each bar in the menu is a submit button with actions-->
                <!--the action attribute describes the event-->
                <form method="get" action="Logout.do">
                    <input type="submit" value="logout"/>
                </form>

                <form method="get" action="Toptags.do">
                    <input type="submit" value="topTags"/>
                </form>

                <form method="get" action="EditAccount.do">
                    <input type="submit" value="myAccount"/>
                </form>

                <form method="get" action="ViewAllTags.do">
                    <input type="submit" value="myTags"/>
                </form>

                <form method="get" action="ViewAllImages.do">
                    <input type="submit" value="myImages"/>
                </form>

                <form method="get" action="ViewAllFriends.do">
                    <input type="submit" value="myPals"/>
                </form>

                <form method="get" action="ReturnHome.do">
                    <input type="submit" value="home"/>
                </form>
            </ul>
            <!--end menubar-->

            <h1 id="clrBoth">You are viewing all images with tag "<c:out value="${currentTag}"/>"</h1>
            <p>Click on an image to add more tags.</p>
            <c:forEach items="${tagObjs}" var="img">
                <form method="get" action="ViewOthersImage.do" id="formwrapper">
                    <!--display image-->
                    <p class="submit"><input type="image" alt="." height="200" width="250" src="resources/<c:out value="${img.upload.image}"/>" /></p>
                    <!--display image and tag metadata-->
                    <p class="submit">Uploader: <c:out value="${img.upload.name}"/></p>
                    <p class="submit">Time Uploaded: <c:out value="${img.upload.datetime}"/></p>
                    <p class="submit">Tagger: <c:out value="${img.tagger}"/></p>
                    <p class="submit">Time Tagged: <c:out value="${img.tagdatetime}"/></p>
                    <input type="hidden" name="uploader" value="<c:out value="${img.upload.name}"/>"/>
                    <input type="hidden" name="uploadedImg" value="<c:out value="${img.upload.image}"/>"/>
                    <input type="hidden" name="uploaderDT" value="<c:out value="${img.upload.datetime}"/>"/>
                    <input type="hidden" name="tagger" value="<c:out value="${img.tagger}"/>"/>
                    <input type="hidden" name="timeTagged" value="<c:out value="${img.tagdatetime}"/>"/>
                    <br/>
                </form>
            </c:forEach>            
        </div>
    </body>
</html>
